package com.ytjj.qmyx.admin.mapper;

import com.ytjj.qmyx.admin.model.ImServiceGroup;
import com.ytjj.qmyx.admin.model.ImServiceGroupExample;

import java.util.Date;
import java.util.List;

import com.ytjj.qmyx.admin.model.dto.ImServiceGroupDto;
import com.ytjj.qmyx.admin.model.dto.ImServiceUserDto;
import org.apache.ibatis.annotations.Param;

public interface ImServiceGroupMapper {
    long countByExample(ImServiceGroupExample example);

    int deleteByExample(ImServiceGroupExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(ImServiceGroup record);

    int insertSelective(ImServiceGroup record);

    List<ImServiceGroup> selectByExample(ImServiceGroupExample example);

    ImServiceGroup selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") ImServiceGroup record, @Param("example") ImServiceGroupExample example);

    int updateByExample(@Param("record") ImServiceGroup record, @Param("example") ImServiceGroupExample example);

    int updateByPrimaryKeySelective(ImServiceGroup record);

    int updateByPrimaryKey(ImServiceGroup record);

//    int insertOne(ImServiceGroupVO imServiceGroupVO);

    List<ImServiceGroupDto> selectGroup(@Param("id") Integer id);

    int updateById(@Param("id") Integer id);

    int updateGroupName(@Param("id") Integer id, @Param("groupName") String groupName);

    List<ImServiceUserDto> selectAllUser();

    int addServiceUser(@Param("id") Integer id, @Param("groupId") Integer groupId, @Param("maxConNum") Integer maxConNum);

    List<ImServiceUserDto> selectByGroupId(@Param("groupId") Integer groupId);

    List<ImServiceGroup> selectAll();

    ImServiceUserDto selectByName(@Param("groupName") String name);

    int insertOne(@Param("groupName") String groupName,@Param("createTime") Date createTime);

    int updateServiceUser(@Param("id") Integer userId,@Param("maxConNum") Integer maxConNum,@Param("groupId") Integer groupId);

    ImServiceUserDto selectByUserId(@Param("id") Integer id);
}